import numpy as np
from numpy.linalg import norm
import sys
file_name1 = sys.argv[1]
file_name2 = sys.argv[2]
data1 = np.fromfile(file_name1, dtype=np.uint8)
data2 = np.fromfile(file_name2, dtype=np.uint8)
data1 = data1.astype(np.float32)
data2 = data2.astype(np.float32)
cosine = np.dot(data1, data2)/(norm(data1) * norm(data2))
print("cosine=", cosine)
